<script>
	
	export default {
		onLaunch() {
			// 判断是否更新
			const updateManager = uni.getUpdateManager();
			
			updateManager.onCheckForUpdate(function (res) {
			  // 请求完新版本信息的回调
			  console.log(res.hasUpdate);
			});
			
			updateManager.onUpdateReady(function (res) {
			  uni.showModal({
			    title: '更新提示',
			    content: '新版本已经准备好，是否重启应用？',
			    success(res) {
			      if (res.confirm) {
			        // 新的版本已经下载好，调用 applyUpdate 应用新版本并重启
			        updateManager.applyUpdate();
			      }
			    }
			  });
			
			});
			
			updateManager.onUpdateFailed(function (res) {
			  // 新的版本下载失败
			});
		}
	}
</script>

<style lang="scss">
	@import '/static/css/default.scss';
	@import '/static/css/Flex.scss';
	/*每个页面公共css */
	@import '/static/font/iconfont.css';
	
	@import "uview-ui/index.scss";

	.u-navbar::v-deep view {
		// background-color: #fd7400!important;
		color: #fff !important;
	}

	.u-navbar::v-deep text {
		color: #fff !important;
	}

	page, view, text, swiper, swiper-item,image, navigator {
	  padding: 0;
	  margin: 0;
	  box-sizing: border-box;
	}

	uni-toast {
		z-index: 999999;
	}
	
	// 弹窗,新窗口顶上来
	/deep/.u-transition {
		z-index: 10065 !important;
	}
	/deep/uni-toast {
		z-index: 99999 !important;
		/* 根据实际情况进行调整 */
	}
	
	/deep/.u-tag--medium {
		display: flex;
		justify-content: center;
		height: 66rpx;
		word-wrap: break-word;
		overflow: hidden;
		background-color: #e5e5e5;
		border: 0;
	}
</style>